/*该文件用于发送所有统计的请求*/

import axios from '@/utils/myAioxs'

//登录的请求

export function getUserToken(authKey) {
  return axios({
    url: '/auth/v1/get-user-token',
    method: 'get',
    params: { authKey }
  })
}
// export const getUserToken = (data) => axios.get("/auth/v1/get-user-token?authKey="+data);





export const getUserCount = (data) => axios.post("/v1/statistics-order/user-count",data);
export const getTotalCount = (data) => axios.post("/v1/statistics-order/total-count",data);
export const getCompanyCount = (data) => axios.post("/v1/statistics-order/company-count",data);
export const getUserSeries = (data) => axios.post("/v1/statistics-order/user-count-series",data);
export const getTotalSeries = (data) => axios.post("/v1/statistics-order/total-count-series",data);
export const getCompanySeries = (data) => axios.post("/v1/statistics-order/company-count-series",data);


/*课程排行榜*/
export const getCourseRank = (data) => axios.post("/v1/statistics-course/course-rank",data);
/*课程购买数量数据统计*/
export const getCourseCount = (data) => axios.post("/v1/statistics-course-purchase/course-count-series",data);
/*折算学时&企业内训统计*/
export const getEnterprise = (data) => axios.post("/v1/statistics-enterprise/list",data);

/*订单&发票统计*/
export const getOrderCount = (data) => axios.post("/v1/order-invoice/count",data);
export const getOrderItem = (data) => axios.post("/v1/statistics-order/item-select",data);


export const getUserComplete = (data) => axios.post("/v1/statistics-user-complete/pie",data);

/*快递统计*/
export const getExpress = (data) => axios.post("/v1/express-month/select",data);
/*企业充值*/
export const getEnterprisePay = (data) => axios.post("/v1/statistics-enterprise-pay/series",data);


/*导出*/
export function getDownload(data) {
  return axios({
    url:  "/v1/statistics-excel/download-zip-copy",
    method: 'post',
    responseType: 'blob',
    data,
  })
}
//折算学时和企业内训数据汇总统计
export const getEnterpriseTotal = (data) => axios.post("/v1/statistics-enterprise/total",data);




